'use strict';

function double_to_one(collection) {

let a=(collection+"");
let arr=a.split(',');
let arr1 = arr.map(function(x){
  return Number(x);
});
let result=arr1.filter(function(element,index,self){
  return self.indexOf(element)==index;
});
console.log(result);
return result;
}
double_to_one([[1, 2, 3], [5, 2, 1, 4], [2, 1]]);
module.exports = double_to_one;
